1. Field of the Invention
This invention relates to a terminal control apparatus in a data transfer control system and more particularly to a terminal control apparatus in a data transfer control system for data transmission/reception processing and editing processing of the transmission/reception data.
2. Description of the Prior Art
In an on-line system in which a central electronic computer is coupled to a terminal device, when a text consisting of a transmission control character part STX, a data part, and transmission control character parts ETX and CRC, as shown in FIG. 1a, is transferred from the central electronic computer to a terminal control apparatus, this terminal control apparatus receives the text and converts it into a format suitable for storage in a screen buffer, as shown in FIG. 1b, which is provided for a display device. The converted information is transferred to the terminal device for display or printing. The data part shown in FIG. 1a contains a command, a control byte, a buffer control character, a buffer address and character data. The command includes an erasing command for the entire screen or an input field alone and a command for read/write of data, the control byte includes instructions for actuation or deactuation of a buzzer, unlocking of a keyboard and printing, the buffer control character includes codes for address setting on the screen buffer, designation of an erasing region or a continuous write-in region, and switching of characters, and the character data includes data to be displayed or printed. For example, let us assume data including a command for data write, and instructions for writing "ABC" into an area beginning from an address ADR1, writing "123" into another area beginning from an address ADR2 and writing "*" into addresses between addresses ADR3 and ADR4. Then, when such data is transferred after erasing the entire screen, a picture as shown in FIG. 2 is displayed.
One method for data transfer between a conventional terminal control apparatus and a central electronic computer is called a program input/output method (hereinafter referred to as PIO method). According to the PIO method, the terminal control apparatus without a buffer memory for storage of the entire reception data performs conversion processing specified for the terminal device, such as code conversion and address conversion, and transfers the converted data to the terminal device each time one byte of the reception data is received; or the terminal control apparatus transmits transmission data each time one byte thereof is established, while subjecting the transmission data inputted from the display device, for example, to the data conversion processing, such as the code conversion and address conversion required for data transmission. The PIO method, however, requires that the terminal control apparatus must complete or end editing operations within a period prescribed by the transmission rate of the communication line. Therefore, if the processing operation of the terminal control apparatus is retarded with respect to the transmission rate and transmission timing, a problem arises. More specifically, unless an editing operation for received data is ended prior to reception of a succeeding byte, loss of reception data (called "overrun") occurs; and unless the code conversion and the like processing of a succeeding byte are ended during the present transmission of one byte, a thinning of transmission data (called "underrun") occurs. The above disadvantageous phenomena will take place in other cases than the data transfer between the terminal control apparatus and the central electronic computer. For example, when the terminal device functions to execute an off-line processing for, for example, a hard copy of a data picture displayed on the display device onto the printer or when it is required to execute a sophisticated editing operation, additional time for the off-line processing is required during the transmission/reception of data and the time for the editing operation per se is necessarily prolonged with the result that the editing operation fails to end within the prescribed period with a high probability, causing a serious problem.
Another method for data transfer is called the buffer method herein. According to the buffer method, the data length of transmission/reception data between a terminal control apparatus and a central electronic computer is predetermined by a rule, and a buffer memory for storage of data of a predetermined length is provided in the terminal control apparatus. Data received from the central electronic computer is first stored in the buffer memory and after the data reception has been completed, the data stored in the buffer memory is put together for code conversion and address conversion and is indicated on a terminal device, i.e., displayed on a display device or printed by a printer. In a similar manner, data inputted from the display device, for example,is subjected to data conversion processing, such as code conversion and address conversion, to thereby prepare transmission data to be stored in the buffer memory. After the preparation of the data has been completed, a transmission operation is started to read the transmission data from the buffer memory. Thus, a communication control unit of the terminal control apparatus executes the transmission/reception operation of data while reading or writing the data from or into the buffer memory in a direct memory access (hereinafter referred to as DMA) manner, which is well known in the art.
This buffer method is advantageously applied to a system in which a microprocessor is controlled by programs to ensure that the operation of the microprocessor can be permitted even during the execution of the DMA operation. However, this method disadvantageously degrades the utilization efficiency of the line because the data transmission/reception operation and the data processing operation are executed in different time periods.
FIG. 3 shows a time chart illustrative of the time for data linkage in accordance with the buffer method.
Referring to FIG. 3, where only one text is transmitted from the computer, a selection signal SEL, the text TEXT and an end signal EOT are sequentially transmitted from the computer and the terminal control apparatus returns an acknowledgment signal ACK indicative of correct reception. Since, in the buffer method, the text is first stored in the buffer and thereaft,er the edit processing is carried out, there needs to be provided a text reception time t.sub.R plus an editing time t.sub.E. The processing for the conversion of the reception data in the buffer memory and its display or printing, or the processing for assembling pieces of the transmission information in order to prepare the transmission data to be stored in the buffer memory is generally called an edit operation or edit processing.
Assuming that the transmission rate is 9600 BPS, one character has 8 bits and the text length is 1200 bytes, the text reception time t.sub.R and edition time t.sub.E are: ##EQU1## and EQU t.sub.E =average text processing time (0.5 ms).times.1200.apprxeq.0.6 (sec.).
Thus, when neglecting the time for processing the selection signal SEL and acknowledgement signal ACK as well as the data delay time on the line, it takes 1.6 sec. for processing one reception text. The data link time or line occupation time required for transmission of one text is T as shown in FIG. 3.
FIG. 4 is an operation sequence chart for a prior art terminal control apparatus based on the buffer method.
In FIG. 4, the abscissa represents time and the ordinate represents data positions for the component elements. Data on the communication line is illustrated at section (a) in FIG. 4, data occupying the communication control unit of the terminal control apparatus is illustrated at section (b), and edited data occupying a terminal control unit of the terminal control apparatus is illustrated at section (c). The reception operation proceeds from left to right and, subsequently, the transmission operation is carried out.
When reception data (sequence 7) transmitted from the computer to the terminal device is received by the communication control unit (sequence 8), reception data Dl to Dn is sequentially written into the reception buffer (sequence 11) through the medium of a DMA write operation (sequence 9), the terminal control apparatus reads the data (sequence 12) at the termination of the data write operation, and a processing circuit of the terminal control apparatus performs the reception editing (sequence 13). After completion of the reception editing, the edited data is sent to the terminal device and stored in the screen buffer (sequence 61) for display or printing.
Data inputted from a keyboard, for example, is transferred via the screen buffer (sequence 61) to the terminal control unit and subjected to transmission editing (sequence 14). Thereafter, edited data Dl to Dn is written into the transmission buffer (sequence 16). The data Dl to Dn written in the transmission buffer is sequentially sent to the communication control unit through the medium of a DMA read operation (sequence 18), transmitted as transmission data (sequence 19) onto the line (sequence 20) and transferred to the computer.
As will be seen from FIG. 4, after the completion of the reception operation (sequence 8), a reception interruption (sequence 10) is generated to start the reception editing (sequence 13). Accordingly, the reception operation and the reception editing are carried out in different time zones or in series. Similarly, in the case of transmission, a transmission instruction (sequence 17) is generated after the completion of the transmission editing (sequence 14) to start the transmission operation. Accordingly, the transmission editing and the transmission operation are carried out in different time periods or in series.